package com.mm.domain.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 用户权限菜单关系信息表
 * </p>
 *
 * @author JueDream
 * @since 2021-08-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_user_permission_relation")
@ApiModel(value="DUserPermissionRelation对象", description="用户权限菜单关系信息表")
public class DUserPermissionRelation implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    public Integer Id;

    @ApiModelProperty(value = "用户编号")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "权限菜单编号")
    @TableField("p_id")
    private Integer pId;

    @Builder
    public DUserPermissionRelation(Integer userId, Integer pId) {
        this.userId = userId;
        this.pId = pId;
    }
}
